<template>
  <div class="no-data-placeholder">
    <div class="half info">
      <div class="title">{{ props.title }}</div>
      <div class="desc" v-if="props.desc">{{ props.desc }}</div>
      <div class="btn-group">
        <slot></slot>
        <!-- <el-button type="primary" :icon="Plus" @click.stop="add">{{
          addBtnText
        }}</el-button> -->
      </div>
    </div>
    <div class="half img">
      <el-icon color="#9FCEFF" size="64"><Picture /></el-icon>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, computed, watch, nextTick } from "vue";
import { Plus, Picture } from "@element-plus/icons-vue";

const props = defineProps<{
  title: string;
  desc?: string;
}>();

const emit = defineEmits(["add"]);

const add = () => {
  emit("add");
};
</script>
<style lang="scss">
.no-data-placeholder {
  width: 808px;
  height: 300px;
  display: flex;

  .half {
    flex: 1;
    height: 100%;

    &.info {
      box-sizing: border-box;
      padding-right: 48px;

      .title {
        line-height: 50px;
        font-size: 36px;
        font-weight: 500;
        color: #303133;
        margin-top: 44px;
      }

      .desc {
        font-size: 14px;
        font-weight: 400;
        color: #606266;
        line-height: 22px;
        margin-top: 16px;
      }

      .btn-group {
        margin-top: 40px;
      }
    }

    &.img {
      background-color: #ecf5ff;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}
</style>
